package com.link.play.fit.ai.ui.weightcontrol

import android.os.Bundle
import android.view.View
import com.link.play.fit.ai.R
import com.link.play.fit.ai.databinding.FgIntermittentFastingBinding
import com.link.play.fit.ai.ui.guide.BasePageFragment


class IntermittentFastingFg : BasePageFragment<FgIntermittentFastingBinding>(FgIntermittentFastingBinding::inflate) {

    var page = pageIndex

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        when (page) {
            0 -> {
                binding.iv.setImageResource(R.mipmap.img_shizhong)
                binding.tvTitle.text = resources.getString(R.string.what_is_intermittent_fasting)
                binding.tv1.visibility = View.VISIBLE
            }

            1 -> {
                binding.iv.setImageResource(R.mipmap.img_hanbao)
                binding.tvTitle.text = getString(R.string.how_intermittent_fasting_works)
                binding.cl2.visibility = View.VISIBLE
            }

            2 -> {
                binding.iv.setImageResource(R.mipmap.img_shalou)
                binding.tvTitle.text = getString(R.string.what_are_the_precautions_of_intermittent_fasting)
                binding.cl3.visibility = View.VISIBLE
            }
        }
    }

}